package org.huang.sample12.controller;

import org.huang.sample12.model.Person;
import org.huang.sample12.service.PersonService;
import org.huang.sample12.service.PersonServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @描述：
 * @作者: Mr.huang
 * @创建时间: 2017/8/31 16:15
 * @版本: 1.0
 */

@RestController
@RequestMapping("/person")
public class PersonController {

    @Autowired
    private PersonService personService;


    @RequestMapping("/add")
    public String addPerson(Person person){

        System.out.println(person);

//        personService.addPerson(person);
        personService.addPerson(null);

        return "success";
    }


}
